$(function () {
    // 判断token是否存在
    let res = localStorage.getItem('mytoken')
    console.log(res);
    if (res == null) {
        location.href = "/login.html"
    }

    // 退出按钮的点击事件
    $('#logout-btn').on('click', function () {
        location.href = "/login.html"
    })

})